package com.office.workflow.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.office.common.annotation.Excel;
import com.office.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.List;

/**
 * 工作流对象 workflow
 * 
 * @author 数字牧马人
 */
public class Workflow extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 工作流ID */
    private Long id;

    /** 工作流名称 */
    @Excel(name = "工作流名称")
    private String name;

    /** 英文名称 */
    @Excel(name = "英文名称")
    private String ename;

    /** 工作流描述 */
    @Excel(name = "工作流描述")
    private String desc;

    /** 图标URL */
    private String icon;

    /** 版本号 */
    @Excel(name = "版本号")
    private String version;

    /** 状态(0:草稿,1:已发布,2:已停用) */
    @Excel(name = "状态", readConverterExp = "0=草稿,1=已发布,2=已停用")
    private String status;

    /** 分类 */
    @Excel(name = "分类")
    private String category;

    /** 标签(JSON格式) */
    private String tags;

    /** 节点列表 */
    private List<WorkflowNode> nodes;

    /** 连线列表 */
    private List<WorkflowLink> links;

    /** 执行次数 */
    private Integer executionCount;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setEname(String ename) 
    {
        this.ename = ename;
    }

    public String getEname() 
    {
        return ename;
    }

    public void setDesc(String desc) 
    {
        this.desc = desc;
    }

    public String getDesc() 
    {
        return desc;
    }

    public void setIcon(String icon) 
    {
        this.icon = icon;
    }

    public String getIcon() 
    {
        return icon;
    }

    public void setVersion(String version) 
    {
        this.version = version;
    }

    public String getVersion() 
    {
        return version;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setCategory(String category) 
    {
        this.category = category;
    }

    public String getCategory() 
    {
        return category;
    }

    public void setTags(String tags) 
    {
        this.tags = tags;
    }

    public String getTags() 
    {
        return tags;
    }

    public void setNodes(List<WorkflowNode> nodes) 
    {
        this.nodes = nodes;
    }

    public List<WorkflowNode> getNodes() 
    {
        return nodes;
    }

    public void setLinks(List<WorkflowLink> links) 
    {
        this.links = links;
    }

    public List<WorkflowLink> getLinks() 
    {
        return links;
    }

    public void setExecutionCount(Integer executionCount) 
    {
        this.executionCount = executionCount;
    }

    public Integer getExecutionCount() 
    {
        return executionCount;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("ename", getEname())
            .append("desc", getDesc())
            .append("icon", getIcon())
            .append("version", getVersion())
            .append("status", getStatus())
            .append("category", getCategory())
            .append("tags", getTags())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
} 